package com.quanyan.club.service;

import com.quanyan.activity.response.RespActivityPoster;
import com.quanyan.api.APIResponse;
import com.quanyan.club.entity.db.TbActivity;
import com.quanyan.club.entity.vo.req.*;
import com.quanyan.club.entity.vo.resp.RespClubActivity;
import com.quanyan.club.entity.vo.resp.RespCreateClubActivity;
import com.quanyan.club.entity.vo.resp.RespSearchActivity;
import com.quanyan.club.entity.vo.resp.RespShareActivity;
import com.quanyan.common.Plugin.PageObj;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * Created by yue.yuan on 2016/11/30.
 * 活动增删改查基本操作接口
 */
public interface ActivityCRUDService {

    /**
     * 创建活动
     */
    APIResponse<RespCreateClubActivity> saveActivity(ReqClubActivity reqClubActivity);

    /**
     * 编辑活动
     */
    APIResponse<RespClubActivity> updateActivity(ReqClubActivity reqClubActivity);

    /**
     * 活动详情
     */
    APIResponse<RespClubActivity> queryClubActivityById(Integer activityId, Integer uid);

    /**
     * 活动详情(简要)
     */
    RespClubActivity selectClubActivityById(Integer activityId);

    /**
     * 活动详情(管理)
     */
    APIResponse<RespClubActivity> queryClubActivityByAdmin(Integer activityId, Integer uid);

    /**
     * 活动分享
     */
    APIResponse<RespShareActivity> shareClubActivityById(Integer activityId, HttpServletRequest request);


    /**
     * 收藏的活动列表
     */
    APIResponse<PageObj<List<RespClubActivity>>> queryActivityListCollect(Integer uid,
                                                                          Integer pageIndex,
                                                                          Integer pageSize);

    /**
     * 俱乐部活动列表
     */
    PageObj<List<RespClubActivity>> clubActivityList(
            ReqClubActivitySearch reqClubActivitySearch, Integer userId);

    /**
     * 根据俱乐部活动状态查询俱乐部活动列表(管理员)
     */
    PageObj<List<RespClubActivity>> clubActivityListByCriteria(
            ReqClubActivityCondition reqClubActivityCondition,Integer userId);


    /**
     * 暂停活动
     * @param reqSuspendInfo
     * @return
     */
    APIResponse suspendActivity(ReqSuspendInfo reqSuspendInfo);

    /**
     * 恢复暂停活动
     * @param reqSuspendInfo
     * @return
     */
    APIResponse reSuspendActivity(ReqSuspendInfo reqSuspendInfo);

    /**
     * 取消俱乐部活动
     * @param activityId
     * @param uid
     * @return
     */
    APIResponse cancelActivity(Integer activityId, Integer uid, boolean isAdmin);

    /**
     * 活动海报列表
     */
    PageObj<List<RespActivityPoster>> selectActivityPosterList(
            Integer pageNum, Integer pageSize, Integer categoryId, Integer clubId);

    /**
     * 批量增加活动海报列表
     */
    APIResponse batchAddActivityPoster(
            List<String> urls, int uid, int categoryId, int clubId);

    /**
     * 批量删除活动海报列表
     */
    APIResponse batchDeleteActivityPoster(
            List<Integer> posterIds, int clubId, int uid);

    /**
     * 获取活动评价配置信息
     * @return
     */
    APIResponse getAppraiseSetting();

    /**
     * 俱乐部评价2.5
     * @param userId
     * @param reqActivityComment
     * @return
     */
    APIResponse activityAppraise(Integer userId, ReqActivityComment reqActivityComment);

    Map<Integer, Integer> createActivityFromExist(List<Integer> rootIds);

    PageObj<List<RespClubActivity>> queryClubActivityListAfterWeek(ReqClubActivityCondition reqClubActivityCondition);
}
